﻿namespace NEvoWeb.Modules.NB_Store
{
    using DotNetNuke.Entities.Portals;
    using Microsoft.VisualBasic;
    using System;
    using System.Web;
    using System.Web.UI.WebControls;

    public abstract class TagExtraInterface
    {
        private static TagExtraInterface objProvider = null;

        static TagExtraInterface()
        {
            CreateProvider();
        }

        protected TagExtraInterface()
        {
        }

        private static void CreateProvider()
        {
            string storeSetting = SharedFunctions.GetStoreSetting(((PortalSettings) HttpContext.Current.Items["PortalSettings"]).PortalId, "tagextra.provider");
            if (storeSetting != "")
            {
                string[] strArray = Strings.Split(storeSetting, ",", -1, CompareMethod.Binary);
                objProvider = (TagExtraInterface) Activator.CreateInstance(strArray[0], strArray[1]).Unwrap();
            }
        }

        public virtual string getExtraHtml(int PortalID, DataListItem container, string CtrlData)
        {
            return "";
        }

        public static TagExtraInterface Instance()
        {
            return objProvider;
        }
    }
}

